import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
  path: '/',
  name: 'index',
  redirect: '/index',
  component: () => import('../views/headers.vue'),
  children: [{
    // 建筑总览
    path: 'index',
    name: 'index',
    component: () => import('../views/index.vue')
  },{
    // 行政管理
    path: 'administrationMin',
    name: 'administrationMin',
    component: () => import('../views/administrationMin.vue')
  },{
    // 安全管理
    path: 'safetyMin',
    name: 'safetyMin',
    component: () => import('../views/safetyMin.vue')
  },{
    // 能源管理
    path: 'energyMin',
    name: 'energyMin',
    component: () => import('../views/energyMin.vue')
  },{
    // 行政安全
    path: 'adminTwo',
    name: 'adminTwo',
    component: () => import('../views/adminTwo.vue')
  },{
    // 智能工厂
    path: 'factoryMin',
    name: 'factoryMin',
    component: () => import('../views/factoryMin.vue')
  },{
    // 智能工厂
    path: 'factoryMinDetail',
    name: 'factoryMinDetail',
    component: () => import('../views/factoryMinDetail.vue')
  }]
}]
const router = new VueRouter({
  mode: "hash",
  routes
})

export default router